/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MOTOR_H
#define __MOTOR_H

#include "main.h"

typedef struct{
	int8_t  dir;
	uint8_t offset;
	int16_t angle;
}motor_data_t;

typedef struct{
	enum _tx_satae_{
		tx_free,
		tx_bus,
	} tx_satae;
	
	enum {
		ctrl_id,
		ctrl_angle,
	} mode;
	
	uint8_t txing_num;
	
	uint8_t set_id;
}motor_tx_t;

#define motor_angle_max				(240)

void motor_init(void);
void motor_it_handler(void);
void motor_task_handler(void);

void motor_set_angle(uint8_t id, int16_t angle);
#endif /* __MOTOR_H */

/******************* (H) COPYRIGHT 2025 FUYEBING*****END OF FILE************/

